#ifndef _LAYOUT_H
#define _LAYOUT_H

// common headers
#include "common.h"

// local headers
#include "zone.h"

#define fL_HORIZONTAL	(BIT(0))

#define fL_COPY_MASK	(fL_HORIZONTAL)

typedef struct sLayout sLayout;
struct sLayout {
	u32 flags;
	struct sLayout *parent;
	struct sLayout *child;
	struct sLayout *prev;
	struct sLayout *next;

	struct sZone *content;
};

typedef struct sLGeometry sLGeometry;
struct sLGeometry {
	u16 width;
	u16 height;

	u16 numspacer;
};

sLayout *	l_new			(u32 flags, sZone *zone);
sLayout *	l_append		(sLayout *lay, u32 flags, sZone *zone);
sLayout *	l_addChild		(sLayout *lay, u32 flags, sZone *zone);
sLayout *	l_getFirst		(sLayout *lay);
sLayout *	l_getLast		(sLayout *lay);
sLGeometry	l_getGeometry	(sLayout *lay);
int			l_render		(sLayout *lay, u16 width, u16 height);

#endif

